//
//  MapController.m
//  VC
//
//  Created by apple on 15/10/10.
//  Copyright © 2015年 Leaning iOS Development. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

typedef void(^CompletionLoadHandle)(id result, NSString *success, NSString *msg);

typedef void (^requestfailblock)(AFHTTPRequestOperation *operation, NSError *error);

@interface WXDataService : NSObject

//网络请求
+ (AFHTTPRequestOperation *)requestWithURL:(NSString *)url
                                    params:(NSMutableDictionary *)params
                                httpMethod:(NSString *)httpMethod
                                     block:(CompletionLoadHandle)block
                                 failblock:(requestfailblock)failblock  ;

//上传图片
+ (AFHTTPRequestOperation *)postImageWithURL:(NSString *)url
                               imagePathFile:(NSString *)fullPathToFile
                                      params:(NSMutableDictionary *)params
                                  httpMethod:(NSString *)httpMethod
                                       block:(CompletionLoadHandle)block;

@end
